package com.fgbf.todo.MainClasses;

/**
 * A class representing a Category of a Task
 * @author Warren Shenk
 * @date 3/12/2012
 *
 */
public class Category {
	
	public Cat currCat;
	
	private enum Cat {
		PERSONAL, WORK, SCHOOL, ALL
	}
	
	public Category() {
		currCat = Cat.PERSONAL;
	}

	public Category(String str) {
		str = str.toUpperCase();
		if (str.equals("PERSONAL"))
			currCat = Cat.PERSONAL;
		else if (str.equals("WORK"))
			currCat = Cat.WORK;
		else if (str.equals("SCHOOL"))
			currCat = Cat.SCHOOL;
		else
			currCat = Cat.ALL;
	}
	
	public void setCurrentCategory(String str) {
		str = str.toUpperCase();
		if (str.equals("PERSONAL"))
			currCat = Cat.PERSONAL;
		else if (str.equals("WORK"))
			currCat = Cat.WORK;
		else if (str.equals("SCHOOL"))
			currCat = Cat.SCHOOL;
		else
			currCat = Cat.ALL;
	}
	
	public String getCurrentCategory() {
		return currCat.toString();
	}
	
}
